package com.vinann.config;

import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.stereotype.Component;

import com.vinann.security.core.authorize.AuthorizeConfigProvider;

@Component
@Order(Integer.MAX_VALUE)
public class WebAuthorizeConfigProviderImpl implements AuthorizeConfigProvider {

	@Override
	public boolean config(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry config) {
		/*config.antMatchers(
				"/user/regist",
				"/fonts/**",
				"/index.html",
				"/").permitAll();*/
		config.antMatchers("/home/**").authenticated().anyRequest().permitAll();
		
		return true;
	}

}
